<div id="tab-title" class="clearfix">
                    	<ul>
                        	<li class="first current uppercase"><a href="/"><?php echo lang('new_product');?></a></li>
                            
                        </ul>
                    </div>
                    <div id="tab-container">
                    	<div class="products clearfix">
                        	<table>
                        	<?php 
                        	$ncolumns = 3;
                        	$nrows = ceil(count($products)/$ncolumns);
                        	
                        	$index = 0;
                        	for ($i = 0; $i < $nrows; $i++){
                        		echo "<tr>";
                        		
                        		for ($j = 0; $j < $ncolumns; $j++){
                        			echo "<td>";
                        			if (isset($products[$index])){
                        				$item = $products[$index];
                        				$index++;
                        		?>
                        		<div class="product">
                                            <div class="product-img">
                                                <div class="image">
                                                    <a href="<?php echo site_url('product/detail/' . $item['code'])?>"><?php echo img(array('src' => getDirByDate($item['date_add'], PRODUCT_IMAGE_PATH) . '/' . $item['image'], 'height' ));?></a>
                                                </div>
                                            </div>
                                            <div class="product-title">
                                                <a href="<?php echo site_url('product/detail/' . $item['code']);?>"><?php echo $item[$lang . '_name']?></a>
                                            </div>
                                            <div class="product-price">
                                                <p><?php echo lang('price')?> : <span class="price-new"><?php echo $item['price']?> USD</span></p>
                                                <!-- >p class="old">Giá cũ : <span class="price-old"><?php echo $item['price']?> USD</span></p-->
                                            </div>
                                            <div class="product-view">
                                                <?php echo lang('number_view');?> : <span>32080</span>
                                            </div>
                                            <div class="product-control">
                                                <div class="add-buy clearfix">
                                                    <a href="/" class="add-cart"></a>
                                                    <a href="<?php echo site_url('cart/add/' . $item['id_product']); ?>" class="prod-buy"><?php echo lang('add_to_cart')?></a>
                                                </div>
                                            </div>
                                        </div>
                        		<?php
                        			}
                        		echo "</td>";
                        		}
                        		
                        		echo "</tr>";
                        	}
                        	?>
                            	
                            </table>
                        </div>
                    </div>